x11: Use GdkMonitor APIs
authorBenjamin Otte <otte@redhat.com>
Sun, 4 Sep 2016 19:52:33 +0000 (21:52 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 16 Oct 2016 16:17:21 +0000 (18:17 +0200)
gdk/x11/gdkcursor-x11.c

index 3cce62fed4dd563a976b725b86e20b56b3a628a8..7f1487328e038d985e397b4e611dba9db5b60434 100644 (file)
@@ -358,7 +358,7 @@ gdk_x11_cursor_get_surface (GdkCursor *cursor,
   /* Assume the currently set cursor was defined for the screen
      scale */
   scale =
-    gdk_screen_get_monitor_scale_factor (gdk_display_get_default_screen (display), 0);
+    gdk_monitor_get_scale_factor (gdk_display_get_primary_monitor (display));
 
   surface = gdk_window_create_similar_image_surface (NULL,
                                                     CAIRO_FORMAT_ARGB32,
@@ -590,7 +590,7 @@ _gdk_x11_display_get_cursor_for_surface (GdkDisplay *display,
   else
     {
       target_scale =
-       gdk_screen_get_monitor_scale_factor (gdk_display_get_default_screen (display), 0);
+        gdk_monitor_get_scale_factor (gdk_display_get_primary_monitor (display));
       xcimage = create_cursor_image (surface, x, y, target_scale);
       xcursor = XcursorImageLoadCursor (GDK_DISPLAY_XDISPLAY (display), xcimage);
       XcursorImageDestroy (xcimage);